window.utools = utools;

// 数据持久化
const DB_KEY = 'dice_history';

window.diceDB = {
  saveHistory(history) {
    utools.dbStorage.setItem(DB_KEY, history);
  },
  getHistory() {
    return utools.dbStorage.getItem(DB_KEY) || [];
  },
  clearHistory() {
    utools.dbStorage.removeItem(DB_KEY);
  }
};

// 插件进入时触发
window.exports = {
  dice: {
    mode: 'none',
    args: {
      enter: (action) => {
        // 可以在这里添加进入插件时的逻辑
        console.log('Plugin entered:', action)
      }
    }
  }
}; 